xenconsoled: use grant references instead of map_foreign_range
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 17 Jan 2013 16:48:21 +0000 (16:48 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 17 Jan 2013 16:48:21 +0000 (16:48 +0000)
commitf12696a8c0f53e07e5aeb1294a1c3836126c6bcf
treea99ea5178d916e0cb4e6f0843bdeaeefba78477f
parenta801a05349d728001693cfd8731044fae08f1ccb
xenconsoled: use grant references instead of map_foreign_range

Grant references for the xenstore and xenconsole shared pages exist, but
currently only xenstore uses these references.  Change the xenconsole
daemon to prefer using the grant reference over map_foreign_range when
mapping the shared console ring.

This allows xenconsoled to be run in a domain other than dom0 if set up
correctly - for libxl, the xenstore path /tool/xenconsoled/domid
specifies the domain containing xenconsoled.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/console/daemon/io.c
tools/console/daemon/io.h
tools/console/daemon/main.c